<script>on mouseUpvisual effect wipe leftif the commandKey is down then go last cardelse go next cardend mouseUp</script>
</part>
<part>
<id>179</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>6</left>
<top>260</top>
<right>18</right>
<bottom>284</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>23718</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>left arrow</name>
<script>on mouseUpvisual effect wipe rightif the commandKey is down then go first cardelse go prev cardend mouseUp</script>
</part>
<name>Home Cards</name>
<script>∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞Script of Stack: HomeTHE MESSAGE HANDLERS IN THIS SCRIPT:openStack,closeStack,openBackground,closeBackground,suspendStack,resumeStack,updateHomeMenu,newLink,makeNewHCButtondragHCButton,updateHCPaths,selectHCFile,getHCPathName,memErrorScriptwriteHCScript,stringIsInContainer∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞on openStack-- remove any similar menusif there is a menu "Home" then delete menu "Home" -- ∆pass openStack -- so others can use itend openStackon closeStackif (there is a menu "Home") and (the short name of this stack is "Home")then delete menu "Home" -- ∆pass closeStack -- so others can use itend closeStackon openBackground-- Requires handlers: createTheMenus,updateHomeMenu-- make the "Home" menu if necessarycreateTheMenus-- update home menu for this bkgndupdateHomeMenu truepass openBackground -- so others can use itend openBackgroundon closeBackground-- Requires handlers: updateHomeMenu-- update home menu for this bkgndupdateHomeMenu falsepass closeBackground -- so others can use itend closeBackgroundon suspendStackif (there is a menu "Home") and (the short name of this stack is "Home")then delete menu "Home" -- ∆pass suspendStack -- so others can use itend suspendStackon resumeStack-- Requires handlers: createTheMenus,updateHomeMenu-- make the "Home" menu if necessarycreateTheMenus true -- force new "Home" menuupdateHomeMenu truepass resumeStack -- so others can use itend resumeStackon updateHomeMenu status-- update the "Home" menu for this backgroundif there is no menu "Home" then exit updateHomeMenu -- ∆set checkMark of menuItem "Home Card" of menu "Home" to status -- ∆end updateHomeMenu----- NewLink Scripts --------------------------------------------on newLink fileType-- Requires handlers: disallowInterruption,allowInterruption-- Requires handlers: makeNewHCButton,dragHCButton,updateHCPaths-- Requires function handlers: selectHCFile,lastHCItem,getHCPathName,writeHCScript-- Allows you to select a stack, application or document from an-- answer dialog, and create a button to open that file.-- This is the main newLink handler and can be called from any stackput visible of msg box into saveVisMsgBox -- to restore it later-- if no file type is given, determine what type of file to link toif (fileType is not in "stack document application file") thenanswer "Create button linked to a stack or file?" ¬with "Cancel" or "File" or "Stack" -- ∆if it is empty or it is "Cancel" then exit newLink -- ∆put it into fileTypeend if-- if it's a file determine what kind of file it isif fileType is "File" thenanswer "Create button linked to a document or an application?" with ¬"Cancel" or "Document" or "Application" -- ∆if it is empty or it is "Cancel" then exit newLink -- ∆put it into fileTypeend ifdisallowInterruption-- selects the stack, application, or document to link toput "Select the" && fileType && "to open:" into prompt -- ∆if fileType is "Stack" then put "STAK" into filter -- ∆else if filetype is "Application" then put "APPL" into filterelse put empty into filter -- no way to show only documentsput selectHCFile(prompt,filter) into longFileName -- full pathput lastHCItem(":",longFileName) into shortFileNameset cursor to watch-- if document is chosen, get application to open it.put empty into longAppNameif fileType is "document" then -- ∆put "Select the application to open" & return ¬& "“" & shortFileName & "”" & ":" into prompt -- ∆put selectHCFile(prompt,"APPL") into longAppName -- full pathput lastHCItem(":",longAppName) into shortAppNameend if-- extract the file path from the full path nameput getHCPathName(longFileName) into thePath-- make a new button for the linked filemakeNewHCButton shortFileName,fileType-- write the script for the new buttonset script of last cd btn to ¬writeHCScript(fileType,shortFileName,shortAppName)-- allow the user to set the position of the new buttonput "card button id" && id of last card button into btnIDdragHCButton btnID -- user can now move it-- update the "Paths" field on the proper "Path" cardupdateHCPaths fileType,thePathif longAppName is not empty then -- for a document's appput getHCPathName(longAppName) into appPathupdateHCPaths "application",appPathend ifput empty into msg -- clean up and exitset visible of msg box to saveVisMsgBox -- restore itallowInterruptionend newLinkfunction selectHCFile prompt,filter-- displays dialog for selection of a particular fileTypeif filter is not empty then answer file prompt of type filterelse answer file promptif (it is empty) or (the result = "Cancel")then exit to HyperCardreturn it -- otherwise return the selected file pathend selectHCFilefunction getHCPathName longName-- Requires handler: lastHCItem-- return the path to the fileput lastHCItem(":",longName) into fileNamereturn char 1 to (length(longName) - length(fileName)) of longNameend getHCPathNameon makeNewHCButton shortName,iconType-- Requires handlers: setUserLevelFive,restoreUserLevel-- create a new button and set it's name and iconlock screensetUserLevelFive-- ∆ need user level five so menu item will be theredoMenu "New Button"-- set attributes of new buttonset style of last card button to transparentset showName of last card button to trueset autoHilite of last card button to trueset name of last card button to shortNameset height of last card button to 52set icon of last card button to iconType-- don't let the button be too slimif length(shortName) * 6 > 36 thenset width of last card button to length(shortName) * 6else set width of last card button to 36choose browse toolrestoreUserLevelunlock screenend makeNewHCButtonfunction memErrorScript appName-- returns a script used in many placesreturn "if the result is not empty then" & return & ¬"beep 1" & return & ¬"answer" && quote & "Not enough memory to open the application “" ¬& appName & "”." & quote & return & ¬"end if" -- ∆end memErrorScriptfunction writeHCScript fileType,fileName,applName-- Requires handler: memErrorScript-- creates and writes the script for the new button -- see makeNewHCButtonput "on mouseUp" & return into theScriptif fileType is "stack" then -- ∆put "-- stack will open in new window if there's enough memory" & return ¬& "go to stack" && quote & fileName & quote && "in a new window" & return ¬& "get the result" & return & "if it is" && quote & "Cancel" & quote && "then exit mouseUp" & return ¬& "if the result <> empty then go to stack" && quote & fileName & quote & return after theScriptelse if fileType is "application" thenput "open" && quote & fileName & quote & return after theScriptput memErrorScript(fileName) & return after theScriptelse if fileType is "document" thenput "open" && quote & fileName & quote ¬&& "with" && quote & applName & quote & return after theScriptput memErrorScript(applName) & return after theScriptend ifput "end mouseUp" after theScriptreturn theScriptend writeHCScripton dragHCButton theButton-- ∆ let user drag the button within the card windowput "Drag the button to the desired location." -- ∆-- flash button until user clicks down on itset cursor to arrowrepeat until the mouse is downset hilite of theButton to not hilite of theButtonwait 8 -- 8/60 of a secondend repeatset hilite of theButton to true-- drag the button but constrain to card windowput width of theButton div 2 into halfBtnWidthput width of card window - halfBtnWidth into maxWidthput height of theButton div 2 into halfBtnHeightput height of card window - halfBtnHeight into maxHeightrepeat while the mouse is down-- the horzput max(the mouseH,halfBtnWidth) into btnHput min(btnH,maxWidth) into btnH-- the vertput max(the mouseV,halfBtnHeight) into btnVput min(btnV,maxHeight) into btnVset loc of theButton to btnH,btnVend repeatset hilite of theButton to falseend dragHCButtonon updateHCPaths fileType,thePath-- Requires function handler: stringIsInContainer-- update the appropriate path card for the newly created buttonglobal Stacks,Applications,Documentsput "s" after fileType -- ∆ so it will match card & global namedo "get" && fileType -- put the appropriate global into "it"-- exit this handler if the global already contains the pathif stringIsInContainer(thePath,it) then exit updateHCPathslock screenset cursor to watchset lockmessages to true -- avoid open messagesset lockrecent to true -- don't make any card miniaturespush card -- remember where we are-- go to the correct path card in the home stackgo card fileType of stack "Home" -- ∆-- update the "Paths" field with the new pathget bg field "Paths" of card fileTypeif (it ≠ empty) and (the last char of it ≠ return)then put return before thePathput thePath after bg field "Paths" of card fileType-- cause the appropriate global variable to be updateddo "put bg field Paths into" && fileTypepop card -- return to where we wereend updateHCPathsfunction stringIsInContainer theString,theContainer-- check to see if theString is a full line of theContainerif (theString = first line of theContainer) or ¬(theString = last line of theContainer) then return trueelse if theContainer contains return & theString & return ¬then return truereturn false -- not found, so return falseend stringIsInContainer</script>